<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* @keyframes spin-reverse {
            from {
                transform: rotate(1turn);
            }
        } */

        @keyframes spin {
            from {
                transform: rotate(0turn) translateY(-150px) translateY(50%) rotate(1turn);
            }

            to {
                transform: rotate(1turn) translateY(-150px) translateY(50%) rotate(0turn);
            }
        }

        .avatar {
            animation: spin 3s infinite linear;
        }

        .avatar {
            animation: spin 8s infinite linear;
            transform-origin: 50% 150px;
            /* 150px = 路径的半径 */
        }

        .avatar>img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            animation: inherit;
            animation-direction: reverse;
        }
    </style>
</head>

<body>
    <div class="path">
        <div class="avatar">
            <img src="images/head01.jpg" />
        </div>
    </div>
</body>

</html>